CPP = g++
OFLAG = -o
CFLAG = -c

.PHONY: clean all

all: test

# get all .cpp files
SrcFiles = $(wildcard *.cpp)
# get all .o files
ObjFiles = $(patsubst %.cpp,%.o,$(wildcard *.cpp))

test : $(ObjFiles)
	$(CPP) $(OFLAG) $@ $(ObjFiles)

%.o : %.cpp
	$(CPP) $(CFLAG) $< $(OFLAG) $@

run:
	./test

clean:
	-@rm -f *.o
	rm *.out
	rm *.log
	rm *.aux

report:
	xelatex report.tex
	xelatex report.tex
	xelatex report.tex
	okular report.pdf

	
